//
//  STAreasTitleCellView.m
//  赛拓
//
//  Created by 王磊 on 8/16/16.
//  Copyright © 2016 立金所. All rights reserved.
//

#import "STAreasTitleCellView.h"
#import "STAreaBean.h"
@interface STAreasTitleCellView()

@property (nonatomic ,strong) UILabel *areaLabel;
@end
@implementation STAreasTitleCellView

- (void)configSubViews {
    [super configSubViews];
    
    UILabel *areaLabel = [UILabel new];
    
    self.areaLabel = areaLabel;
    
    areaLabel.textAlignment = NSTextAlignmentCenter;
    
    [self addSubview:areaLabel];
    
    areaLabel.textColor = ST_999999_COLOR;
}

- (void)updateData:(id)data {
    
    STAreaBean *area = data;
    
    self.areaLabel.text = area.name;
    
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.areaLabel.frame = self.bounds;
}
- (void)setSelected:(BOOL)selected {
    [super setSelected:selected];
    
    self.areaLabel.textColor = selected ? [UIColor redColor] : ST_999999_COLOR;
    
}

@end
